package com.jt.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ProviderFallbackFactory implements FallbackFactory<RemoteProviderService> {

    public RemoteProviderService create(Throwable throwable) {
        return new RemoteProviderService() {
            public String echoMsg(String msg) {
                //....通知运维人员
                return "服务维护中";
            }
        };
    }
}
